// Copyright 2012 Dorival de Moraes Pedroso. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// +build ignore

package main

import (
    "fmt"
    "code.google.com/p/gemlab"
)

func main() {
    rg := gemlab.Sregions{
        []int{-1},    // region tags
        []int{ 1},    // Nx
        []int{20},    // Ny
        []int{ 1},    // Nz
        []float64{0}, // Ax
        []float64{0}, // Ay
        []float64{0}, // Az
        []int{0},     // NlX
        []int{0},     // NlY
        []int{0},     // NlZ
        [][]float64{  // points
            {0.0, 0.0, 0.0},
            {1.0, 0.0, 0.0},
            {1.0, 6.0, 0.0},
            {0.0, 6.0, 0.0},
            {0.0, 0.0, 1.0},
            {1.0, 0.0, 1.0},
            {1.0, 6.0, 1.0},
            {0.0, 6.0, 1.0},
        },
        [][]int{ // regions connectivity
            {0, 1, 2, 3, 4, 5, 6, 7},
        },
        [][]int{ // boundary tags
            {0, 0, 0, 0, 0, 0},
        },
    }
    le := gemlab.Lregions{
        []int{-4}, // rtags
        []int{-5}, // jtags
        []int{ 1}, // quads
        [][]float64{ // points
            {0.5, 2.0, 0.2}, // x,y,z-values
            {0.5, 6.0, 0.8},
        },
        [][]int{ // connectivity
            {0, 1},
        },
        [][]int{ // boundary tags
            {-6, -66}, // left, right
        },
    }
    quad := false
    err  := gemlab.SmeshGen("t_smesh03", quad, &rg, &le)
    if err != nil {
        fmt.Printf("%v\n", err.Error())
    }
}
